<?php

use Faker\Generator as Faker;

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/

$factory->define(App\Part::class, function (Faker $faker) {

    //leave some parts incomplete
    $completed = random_int(0,1)==0;
    $tgt=$completed?$faker->realText():"";
    $translate_status=$completed?'completed':"translating";
    return [
        'src' => $faker->realText(random_int(50,300)),
        'tgt' => $tgt,
    ];

});
